<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<t:base type="jquery,easyui,tools,DatePicker"></t:base>
<div class="easyui-layout" fit="true">
  <div region="center" style="padding:0px;border:0px">
  <t:datagrid name="deviceList" checkbox="false" fitColumns="true" title="加工服务申请列表" actionUrl="processingServiceController.do?auditDatagrid" idField="id" fit="true" queryMode="group">
   <t:dgCol title="主键"  field="id"  hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="创建日期"  field="createDate" formatter="yyyy-MM-dd" hidden="true"  queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="state"  field="state.value"  hidden="true"  queryMode="single"  width="120"></t:dgCol>   
   <t:dgCol title="申请人" field="applyUser.realName" width="100" ></t:dgCol>
   <t:dgCol title="申情人手机号" field="applyCellphone" width="100" ></t:dgCol> 
   <t:dgCol title="加工名称"  field="title"   query="true" queryMode="single"  width="120"></t:dgCol>
   <t:dgCol title="分配教师"  field="assignTeacher.realName"   query="true" queryMode="single"  width="100"></t:dgCol>
   <t:dgCol title="状态"  field="state.name"  hidden="false"  queryMode="single"  width="100"></t:dgCol>
   <t:dgCol title="操作" field="opt" width="100"></t:dgCol>
   
   <t:dgFunOpt  funname="audit(id)" title="审核" />   
   <t:dgFunOpt  funname="downloadAtta(id)" title="下载图纸" />   
   
   <t:dgFunOpt  funname="showItemDetail({'查看'},{'processingServiceController.do?goUpdate'},id,{'700'},{'400'})" title="查看"  />
   
   
  </t:datagrid>
  </div>
 </div>
 <script type="text/javascript">

 

function audit(id){
	var addurl = 'processingServiceController.do?goAudit&id='+id;
	  $.dialog({
		  	id:'deviceReturn',
			content: 'url:'+addurl,
			lock : true,
			zIndex: 50, 
			width:420,
			height:260,
			title:'审批', 
			opacity : 0.3,
			ok: function(){
				iframe = this.iframe.contentWindow;
				$('#btn_sub', iframe.document).click(); 
				return false;
			},
			cache:false,
			close:reloadTable
	});
}
 
 

function downloadAtta(id){
	window.open("cms-attach.do?download&ownerId="+id);
}
 </script>